<template>
    <div class="head">
        <div class="headTitle">{{ title }}</div>
        <van-icon
            name="close"
            class="closeIcon"
            color="#fff"
            size="20"
            @click="back"
        />
    </div>
</template>

<script>
export default {
    props: ["title", "type"],
    data() {
        return {};
    },
    methods: {
        back() {
            console.log(this.type);
            if (this.type == 1) {
                this.$store.state.popup = false;
            } else {
                this.$store.state.popupFeedback = false;
            }
        },
    },
};
</script>

<style lang="less" scoped>
.head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 39px;
    background-image: linear-gradient(to top, #8dbdff, #3264a9);
    .headTitle {
        font-size: 18px;
        color: #ffffff;
        margin-left: 36px;
    }
    .closeIcon {
        margin-right: 6px;
    }
}
</style>